from ultralytics import YOLO

if __name__ == '__main__':
    # Load a model
    model = YOLO("..\\runs\\detect\\train21\\weights\\best.pt")  # load model
    model.predict(source="D:\\Tools\\yolo\\dlb\\PCB_DATASET\\images\\val2017", save=True, save_conf=True, save_txt=True, name='output')